package com.sos.service;

import java.io.File;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Environment;
import android.provider.MediaStore;

/**
 * 拍照
 * **/
public class CameraService {
	private Context context;
	public CameraService(Context context)
	{
		this.context=context;
	}
	public Intent camer(String fileName)
	{
		Uri fileUri = null;
		Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
		File out = new File(Environment.getExternalStorageDirectory(),
				fileName);
		intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); // set the				
		Uri uri = Uri.fromFile(out);
		intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
		
		return intent;
		
	}
}
